package training.designpatterns;

public class ObserverDemo {

	public static void main(String[] args) {
		
		Observer observer1 = new ObserverImpl1();
		Observer observer2 = new ObserverImpl2();
		
		Subject subject = new SubjectImpl();
		subject.addObserver(observer1);
		subject.addObserver(observer2);
		
		
		//dummy notification for observers
		subject.notifyObservers();
		subject.removeObserver(observer2);
		
		subject.notifyObservers();

	}

}
